<?php

use yii\db\Migration;

class m161104_024949_create_group extends Migration
{
    public function up()
    {
        $this->createTable('kd_group', [
            'g_id'=>$this->primaryKey()->comment('小组id'),
            'created_by'=>$this->string(20)->notNull()->comment('创建人'),
            'add_shijian'=>$this->dateTime(50)->notNull()->comment('添加时间'),
            'update_people'=>$this->string(50)->comment('修改人'),
            'update_time'=>$this->dateTime(50)->comment('修改时间'),
            'class_name'=>$this->string(20)->notNull()->comment('所属班级名称'),
        ]);

    }

    public function down()
    {
        $this->dropTable('kd_group');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
